home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-05-01 | 1.1 KB | 56 lines | [TEXT/SPM ] |
- /* mac06©1998 by HNS/DSITRI hns@computer.org
- ** netinet/ip_icmp.h
- ** 01.05.1998 HNS pulled out from ping.c
- */
-
- #pragma once
-
- #include <netinet/in_systm.h>
-
- struct icmp
- {
- short icmp_type; /* major type */
- #define ICMP_ECHOREPLY 0
- #define ICMP_UNREACH 1
- #define ICMP_SOURCEQUENCH 2
- #define ICMP_REDIRECT 3
- #define ICMP_TIMXCEED 4
- #define ICMP_PARAMPROB 5
- #define ICMP_TSTAMP 6
- #define ICMP_TSTAMPREPLY 7
- #define ICMP_ECHO 8
- #define ICMP_IREQ 9
- #define ICMP_IREQREPLY 10
- #define ICMP_MASKREQ 11
- #define ICMP_MASKREPLY 12
- short icmp_code; /* subtype */
- #define ICMP_UNREACH_NET 0
- #define ICMP_UNREACH_HOST 1
- #define ICMP_UNREACH_PROTOCOL 2
- #define ICMP_UNREACH_PORT 3
- #define ICMP_UNREACH_NEEDFRAG 4
- #define ICMP_UNREACH_SRCFAIL 5
- #define ICMP_REDIRECT_NET 0
- #define ICMP_REDIRECT_HOST 1
- #define ICMP_REDIRECT_TOSNET 2
- #define ICMP_REDIRECT_TOSHOST 3
- #define ICMP_TIMXCEED_INTRANS 0
- #define ICMP_TIMXCEED_REASS 1
- long icmp_cksum;
- unsigned short icmp_seq;
- int icmp_id;
- int icmp_ip;
- struct
- {
- u_long ih_gwaddr;
- u_char ih_pptr;
- } icmp_hun;
- };
-
- #define ICMP_MINLEN 10
-
- /* EOF */
-
-
-
-